import 'package:flutter_test/flutter_test.dart';
import 'package:business_media/business_media.dart';
import 'package:business_media/business_media_platform_interface.dart';
import 'package:business_media/business_media_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockBusinessMediaPlatform
    with MockPlatformInterfaceMixin
    implements BusinessMediaPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final BusinessMediaPlatform initialPlatform = BusinessMediaPlatform.instance;

  test('$MethodChannelBusinessMedia is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelBusinessMedia>());
  });

  test('getPlatformVersion', () async {
    BusinessMedia businessMediaPlugin = BusinessMedia();
    MockBusinessMediaPlatform fakePlatform = MockBusinessMediaPlatform();
    BusinessMediaPlatform.instance = fakePlatform;

    expect(await businessMediaPlugin.getPlatformVersion(), '42');
  });
}
